<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- 
    Document   : consultarCategoria
    Created on : 12-oct-2012, 19:01:26
    Author     : Shalom Martinez
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%
            HttpSession variableSesion = request.getSession(false);
            if (variableSesion.getAttribute("nombreUsuario") == null) {
                response.sendRedirect("../");
            } else if (!dp.Seguridad.meAbren(request.getRequestURI(), variableSesion.getAttribute("codigoUsuario"))) {
                response.sendRedirect("../error.jsp");
            }
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link type="text/css" rel="stylesheet" href="../lib/css/estilos.css">

        <script type="text/javascript" src="../lib/js/jquery-1.8.2.min.js"></script>
        <script type="text/javascript" src="../lib/js/consultarCategoria.js"></script>

        <script type="text/javascript" src="../lib/js/jquery.dataTables.js"></script>
        <link type="text/css" rel="stylesheet" href="../lib/css/jquery.dataTables.css">


        <title>Consultar Categoria</title>
    </head>
    <body>
        <jsp:useBean id="beanCategoriaDP" scope="page" class="dp.CategoriaDP" />
        <h3>Consulta Categoria</h3>
        <br>

        <table id="tblconsultarCategoria">
            <thead>
                <tr>
                    <th>Codigo Categoria</th>
                    <th>Tipo Categoria</th>
                    <th>Descripcion Categoria</th>

                </tr>
            </thead>
            <tbody>
            <c:forEach var="categoria" items="${beanCategoriaDP.consultaCategoria}">
                    <tr>
                        <td>${categoria[0]}</td>
                        <td>${categoria[1]}</td>
                        <td>${categoria[2]}</td>


                     </tr>
                </c:forEach>
            </tbody>
        </table>
    </body>
</html>
